/**
 * 按需加载echarts
 */
// 引入echarts核心模块
import * as echarts from 'echarts/core'
// 引入各种图表，图表后缀都为Chart
import { BarChart, LineChart, PieChart } from 'echarts/charts'
// 引入提示框，标题，直角坐标系等组件，组件后缀都为Component
import { TitleComponent, TooltipComponent, GridComponent, LegendComponent, ToolboxComponent } from 'echarts/components'
// 引入Canvas渲染器，注意引入CanvasRenderer或者SVGRenderer 是必须的一步
import { CanvasRenderer } from 'echarts/renderers'

// 注册必须的组件
echarts.use([TitleComponent, TooltipComponent, GridComponent, LegendComponent, ToolboxComponent, BarChart, LineChart, PieChart, CanvasRenderer])

export default echarts
